import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '审核人姓名',
    align:"center",
    dataIndex: 'approvalPeople'
   },
   {
    title: '审核时间',
    align:"center",
    dataIndex: 'approvalTime'
   },
   {
    title: '得分',
    align:"center",
    dataIndex: 'score'
   },
   {
    title: '得分说明',
    align:"center",
    dataIndex: 'note'
   },
   {
    title: '审核状态',
    align:"center",
    dataIndex: 'state_dictText'
   },
   {
    title: '审核意见',
    align:"center",
    dataIndex: 'opinion'
   },
   {
    title: '附件',
    align:"center",
    dataIndex: 'appendix',
    slots: { customRender: 'fileSlot' },
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '审核人姓名',
    field: 'approvalPeople',
    component: 'Input',
  },
  {
    label: '审核时间',
    field: 'approvalTime',
    component: 'Input',
  },
  {
    label: '得分',
    field: 'score',
    component: 'InputNumber',
  },
  {
    label: '得分说明',
    field: 'note',
    component: 'Input',
  },
  {
    label: '审核状态',
    field: 'state',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"check_state"
     }
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入审核状态!'},
          ];
     },
  },
  {
    label: '审核意见',
    field: 'opinion',
    component: 'InputTextArea',//TODO 注意string转换问题
  },
  {
    label: '附件',
    field: 'appendix',
    component: 'JUpload',
    componentProps:{
     }
  },
];
